package com.hserver.deploy.controller;

import com.hserver.deploy.service.IndexService;
import top.hserver.core.interfaces.HttpResponse;
import top.hserver.core.ioc.annotation.*;

import java.util.HashMap;
import java.util.Map;

@Controller
public class IndexController {

    @Autowired
    private IndexService indexService;

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public void index(HttpResponse httpResponse) {
        Map<String, Object> data = new HashMap<>();
        data.put("javaDeployList", indexService.getList());
        httpResponse.sendTemplate("index.ftl", data);
    }
}
